<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Document</title>
    <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  </head>
  <body></body>
  <script>
    let soapMessage = ''
    soapMessage +=
      '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://service.teacher.ws.com/">'
    soapMessage += '   <soapenv:Header />'
    soapMessage += '      <soapenv:Body>'
    soapMessage += '              <ser:tc_getzw_xminfo>'
    soapMessage += '                      <fzr>18129</fzr>'
    soapMessage += '                      <time>2019-01-08 10:22</time>'
    soapMessage += '                      <suid>18129</suid>'
    soapMessage +=
      '                      <verify>421a19d005b7ebae99f31ea84714fab8</verify>'
    soapMessage += '              </ser:tc_getzw_xminfo>'
    soapMessage += '      </soapenv:Body>'
    soapMessage += '   </soapenv:Envelope>'

    $.ajax({
      url: 'http://192.168.164.13:8080/XMDXWebservice/teacherservice?wsdl', //访问的url

      dataType: 'xml', //返回的数据类型

      type: 'post', //请求方式

      contentType: 'application/soap+xml;charset=UTF-8',

      data: soapMessage, //数据

      success: function(data, status, xhr) {
        //对返回后的数据进行解析
        console.info(data)
        // $(data)
        //   .find('return')
        //   .each(function(index, item) {
        //     console.debug(item.innerHTML)
        //     console.debug($(this))
        //   })
      },

      error: function(xhr, status) {
        alert('出错了:' + status)
      }
    })
    // $.post(
    //   'http://192.168.164.13:8080/XMDXWebservice/teacherservice?wsdl',
    //   soapMessage,
    //   function(data) {
    //     console.info(data)
    //   }
    // )
  </script>
</html>
